package org.jeecg.modules.business.doc.outbound.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.business.doc.outbound.entity.WmsOutReceiptMaterial;
import org.jeecg.modules.business.doc.outbound.entity.vo.UnCreateOutVO;
import org.jeecg.modules.business.doc.outbound.vo.WmsOutReceiptMaterialResponseVO;

/**
 * @Description: 出库单-物料
 * @Author: jeecg-boot
 * @Date:   2023-08-09
 * @Version: V1.0
 */
public interface WmsOutReceiptMaterialMapper extends BaseMapper<WmsOutReceiptMaterial> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<WmsOutReceiptMaterial>
   */
	public List<WmsOutReceiptMaterial> selectByMainId(@Param("mainId") String mainId);

	/**
	 * 补单-查询所有未创建出库单的物料信息(不需要拣货)
	 * @param taskId
	 * @param receiptId
	 * @param materialName
	 * @return
	 */
    List<UnCreateOutVO> listAllUnCreateTaskMaterial(@Param("taskId") String taskId, @Param("receiptId") String receiptId, @Param("materialName") String materialName);

	/**
	 * 补单-查询所有未创建出库单的物料信息(需要拣货)
	 * @param taskId
	 * @param receiptId
	 * @param materialName
	 * @return
	 */
	List<UnCreateOutVO> listAllUnCreateTaskPick(@Param("taskId")String taskId, @Param("receiptId") String receiptId, @Param("materialName") String materialName);

	/**
	 * 出库单-物料主表ID分页查询
	 * @param page
	 * @param id
	 * @return
	 */
    IPage<WmsOutReceiptMaterialResponseVO> queryPageReceiptMaterialByTaskId(@Param("page") IPage<WmsOutReceiptMaterial> page, @Param("id") String id);
}
